home *** CD-ROM | disk | FTP | other *** search
/ Teach Yourself VRML 2 in 21 Days / Teach Yourself VRML 2 in 21 Days.iso / mac / ISO9660 / 3rdparty / POLYTRAN / dos / PT_DOS.ZIP / DOC_MAN / IMP_DEM.MAN < prev    next >
Encoding:
Text File  |  1996-06-13  |  17.2 KB  |  391 lines

  1.  
  2.  
  3. Import-USGS-DEM()          Unix Programmer's Manual          Import-USGS-DEM()
  4.  
  5.  
  6. NAME
  7.      imp_dem - USGS Digital Elevation Model (DEM) geometry import filter
  8.  
  9. SYNOPSIS
  10.  
  11.      This man page describes the options specific to  the  USGS  DEM  geometry
  12.      import converter.
  13.  
  14. EXAMPLE CONVERSION SYNTAX
  15.  
  16.      To convert a USGS DEM file to 3D  Studio  using  the  default  parameters
  17.      listed in the setup.ini file:
  18.  
  19.           pt -i dem -o 3ds filename.dem
  20.  
  21.      To convert a USGS DEM file to VRML  and  override  some  of  the  default
  22.      options in setup.ini:
  23.  
  24.           pt -i dem -in-dem-skip-factor = 6 -o vrml filename.dem
  25.  
  26. OVERVIEW
  27.  
  28.      The USGS DEM geometry import converter imports, manipulates and  converts
  29.      digital  elevation  model  (DEM)  data.  This  DEM  data is provided as a
  30.      service of the United States Geological  Survey  (USGS).  Each  data  set
  31.      describes  the  elevation  of  semi-square  regions  of  land for various
  32.      locations across the U.S.A., Alaska, Hawaii and some surrounding areas of
  33.      Mexico  and  Canada. The most accurate DEM data sets are sampled every 30
  34.      metres (7.5 minute DEMs) while the least accurate are sampled every 3 arc
  35.      seconds  (for  1:250,000  scale DEMs). See below for a description of the
  36.      various DEM dataset types.
  37.  
  38.      Since these datasets are abundant and available freely via the  Internet,
  39.      this  converter  can  be  put  to  good  use  for creating realistic (and
  40.      accurate) 3d landscape geometry. Two sample images are distributed  along
  41.      with  this conversion program: dem_pic1.gif is a hidden line rendering of
  42.      Mount St.  Helens and dem_pic2.gif is a shaded version of the  same  data
  43.      (with "Al the Gangster" visiting Mount St. Helens).
  44.  
  45.      The following Internet sites provide  more  information  about  USGS  DEM
  46.      data:
  47.  
  48.           http://nsdi.usgs.gov/nsdi/products/dem.html
  49.           http://nsdi.usgs.gov/nsdi/maps/dem1deg.HTML
  50.  
  51.      And the following Internet sites contain vast amounts of USGS DEM data:
  52.  
  53.           ftp://spectrum.xerox.com/ds9/map/dem
  54.                A multiple of DEM Files from XEROX (Mt. St. Helens)
  55.           ftp://edcftp.cr.usgs.gov/pub/data/DEM/250
  56.           http://nsdi.usgs.gov/nsdi/wais/maps/dem1deg.HTML
  57.           http://sun1.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                                                              1
  65.  
  66.  
  67.  
  68. Import-USGS-DEM()          Unix Programmer's Manual          Import-USGS-DEM()
  69.  
  70.  
  71.      The DEM file format document is available from the following ftp site:
  72.  
  73.                ftp://nmdpow9.er.usgs.gov/public/demstnds/stdempt1.ps
  74.                ftp://nmdpow9.er.usgs.gov/public/demstnds/stdempt2.ps
  75.                ftp://nmdpow9.er.usgs.gov/public/demstnds/stdempt3.ps
  76.  
  77. PROBLEMS WITH USGS DEM DATA
  78.  
  79.      While one might be lead to  believe  that  elevation  data  sampled  from
  80.      satellites  is  perfect  and  100% accurate, it is not, nor even close to
  81.      being accurate.
  82.  
  83.      Several problems exist with USGS DEM data that one must be aware of:
  84.  
  85.           First, the projection  mapping  techniques  used  to  transform  the
  86.           spherically  sampled  data  to UTM or longitude/latitude coordinates
  87.           introduces  distortion  into  the  dataset.  This  is   similar   to
  88.           flattening  out  a  spherical  map of the world into a flat mercator
  89.           map.
  90.  
  91.           Second, undefined regions (areas with no valid elevation  data)  are
  92.           often  found  at  the  corners  and  sides of the DEM datasets. This
  93.           causes a problem if two  or  more  DEM  datasets  are  imported  and
  94.           "stitched"  together  -  holes  will  most likely appear between the
  95.           datasets.
  96.  
  97. FEATURES OF THIS CONVERTER
  98.  
  99.      DEM datasets typically contain 60000 or more quadrilateral  polygons,  or
  100.      1200000  triangles  (for  a  258x258  resolution  sample; the maximum DEM
  101.      dataset  size  if  2050x2050  which   would   result   in   4.2   million
  102.      quadrilaterals  or  8.4 million triangles). This is an enormous number of
  103.      polygons  for  most  3d  rendering  programs  so   this   DEM   converter
  104.      incorporates two unique options to overcome this problem:
  105.  
  106.           1) The converter can skip over samples in the dataset so  that  only
  107.           every  n-th  sample  is used. Rather than importing 258x258 samples,
  108.           the converter imports 51x51 samples (for a skip factor of  5)  which
  109.           results in only 2601 quadrilateral polygons.
  110.  
  111.           2) Rather than store the entire DEM dataset in  single  object,  the
  112.           DEM  converter breaks up the data into multiple smaller objects with
  113.           a common parent. This  has  shown  to  be  an  effective  method  to
  114.           speeding  up the wireframe redraws of the DEM data (by a factor of 2
  115.           or 3), and makes interactive user  movement  of  a  3d  camera  much
  116.           faster  since  each  sub-object  is only a few hundred polygons.  In
  117.           addition,  certain  rendering  programs  (such  as  Okino's   NuGraf
  118.           renderer)  use  much  less memory when many smaller objects are used
  119.           rather than one large object with many  polygons.  By  default  each
  120.           sub-object  stores  a  maximum  of  900 polygons; contrast this with
  121.           other converters which lump  all  120,000  polygons  into  a  single
  122.           object - few renderers will be able to render such a large object.
  123.  
  124.           3) A default 3d camera is added to the scene  which  views  the  DEM
  125.           data from a pleasing angle.
  126.  
  127.  
  128.  
  129.                                                                              2
  130.  
  131.  
  132.  
  133. Import-USGS-DEM()          Unix Programmer's Manual          Import-USGS-DEM()
  134.  
  135.  
  136.           4) u/v texture coordinates are added to the imported data so that  a
  137.           bitmap image can be easily draped over the DEM data.
  138.  
  139.           5) The converter creates smoothed vertex normals for the DEM data so
  140.           that it will appear to be smooth when rendered.
  141.  
  142. COMMAND LINE OPTIONS
  143.  
  144.      The following options are specific to this import converter:
  145.  
  146.      -i dem
  147.           This is the optional command line option which  specifies  that  the
  148.           input data is in the USGS DEM file format. If not specified then the
  149.           converter will try to guess the input file's format  from  its  file
  150.           extension (.dem) and then from the contents of its file.
  151.  
  152.      -in-dem-center-at-origin = [ yes | no ]
  153.           If set to 'yes' then the DEM data will be centered about the  origin
  154.           (0,0,0).  Please  note  that  if  the  input  DEM  dataset  uses the
  155.           "Geographic" or "State Plane" grid types  then  the  DEM  data  will
  156.           always be centered about the origin; this may cause a problem if you
  157.           want to import two DEM datasets and have them sit side-by-side -  in
  158.           this  case you will have to physically move the two datasets so that
  159.           they are side-by-side.
  160.  
  161.      -in-dem-print-statistics = [ yes | no ]
  162.           If set to 'yes' then the converter will  print  out  the  number  of
  163.           objects and polygons created.
  164.  
  165.      -in-dem-list-header-info = [ yes | no ]
  166.           If set to 'yes' then the converter will print out information  about
  167.           the imported DEM data including the following information:
  168.  
  169.           The DEM data description from the file,
  170.  
  171.           The number of profiles which is the number of lines of  sample  data
  172.           in the X direction,
  173.  
  174.           The projection mapping type (geographic, UTM or state plane),
  175.  
  176.           The actual geographic coordinates of the DEM dataset's four corners,
  177.  
  178.           The minimum and maximum elevations.
  179.  
  180.      -in-dem-add-default-camera = [ yes | no ]
  181.           If set to 'yes' then the converter will add a default camera to  the
  182.           scene which views the DEM data at a pleasing angle.
  183.  
  184.      -in-dem-skip-factor = #
  185.           This switch determines the quality of  the  imported  DEM  data  (it
  186.           directly  controls how many polygons will be used to approximate the
  187.           input DEM data). THIS IS AN IMPORTANT CONTROL PARAMETER!! A value of
  188.           1  results in the highest quality mesh while higher values (2, 3, 4,
  189.           etc) result in lower quality, but at the  benefit  of  reducing  the
  190.           number  of  polygons  in  the input data. This number will cause the
  191.           converter to 'skip' over every n-th input sample.  For  example,  if
  192.  
  193.  
  194.                                                                              3
  195.  
  196.  
  197.  
  198. Import-USGS-DEM()          Unix Programmer's Manual          Import-USGS-DEM()
  199.  
  200.  
  201.           the input dataset size is 258x258 samples, and the  skip  factor  is
  202.           set to 4, then the converter will actually read in the data as if it
  203.           were of size 65x65 (258/4 = 65). This  will  produce  4225  polygons
  204.           (65x65) instead of 66565 polygons. A value of 2 or 3 (16641 polygons
  205.           to 7396 polygons) will produce good results for a  final  rendering,
  206.           while  values  of  5 to 8 will produce small datasets ideal for fast
  207.           previews (2704 polygons to 1024 polygons).
  208.  
  209.      -in-dem-sub-grid-size = #
  210.           By default the DEM data will be cut up  into  several  smaller  sub-
  211.           objects rather than having all of the DEM data clumped together into
  212.           one huge object. This option controls how many polygons will be  put
  213.           into  each  sub-object.  The  default  is  30  which  will cause 900
  214.           polygons (30x30) to be stored in each sub-object.
  215.  
  216.      -in-dem-height-scaling-factor = #
  217.           This option scales the height of the DEM data. It  default  to  1.0.
  218.           Values  greater  than 1.0 will make the DEM data higher while values
  219.           between 0.0 and 1.0 will make the DEM data shorter.
  220.  
  221.      -in-dem-add-2d-txtr-coords = [ yes | no ]
  222.           If set to 'yes' then u/v texture coordinates will be  added  to  the
  223.           imported  dataset.  These texture coordinates will allow a 2d bitmap
  224.           image to be easily mapped to the surface of the  data.  Please  note
  225.           that  the  texture  coordinates  are  aligned  with the mathematical
  226.           bounding quadrilateral of the dataset, not the actual physical edges
  227.           of  the data (this is because the physical edges of the data are not
  228.           square or precise).
  229.  
  230.      -in-dem-add-default-2d-texture = [ yes | no ]
  231.           If  set  to  'yes'  then  a   default   2d   bitmap   texture   file
  232.           ("default.tif")  will  be  linked  to  the  DEM data. This option is
  233.           useful if you intend to apply a 2d bitmap image to the DEM data. The
  234.           "-in-dem-add-2d-txtr-coords" option must also be enabled.
  235.  
  236.      -in-dem-texture-2d-u-repeat = 5
  237.  
  238.      -in-dem-texture-2d-v-repeat = 5
  239.           These two values determine how many times the 2d bitmap  texture  is
  240.           to repeat across the DEM data surface (see the "-in-dem-add-default-
  241.           2d-texture" option above). The default values are 5 which will  make
  242.           the   texture   repeat  5  times  in  the  horizontal  and  vertical
  243.           directions.
  244.  
  245.      -in-dem-add-default-3d-texture = [ yes | no ]
  246.           If  set  to  'yes'  then  a  NuGraf  "mountain"  procedural  texture
  247.           definition  will  be  added to the scene and assigned to the current
  248.           shader (useful for rendering the DEM data with the NuGraf renderer).
  249.           This  texture  varies  the  color  of  the DEM data according to the
  250.           elevation and slope of a polygon (the color varies from  greens,  to
  251.           browns  to  whites at the highest altitudes).  Please note that this
  252.           texture tends to be slow to  compute  due  to  the  turbulence  math
  253.           functions;  a  better  alternative  would  be  to assign a 2d bitmap
  254.           texture.
  255.  
  256.  
  257.  
  258.  
  259.                                                                              4
  260.  
  261.  
  262.  
  263. Import-USGS-DEM()          Unix Programmer's Manual          Import-USGS-DEM()
  264.  
  265.  
  266.      -in-dem-create-one-object = [ yes | no ]
  267.           If set to 'yes' then one single object is created  for  all  of  the
  268.           imported  data  rather  than having the data broken up into multiple
  269.           smaller sub-objects (the default). The converter automatically  sets
  270.           this to 'yes' (internally) if the selected output format is to be 3D
  271.           Studio (this is because 3D Studio requires all polygons to be inside
  272.           a  single object so that its smoothing algorithm will work properly;
  273.           if multiple objects are used then the vertex normals will not be the
  274.           same where the sub-objects meet and hence "cracks" may appear at the
  275.           junctions).
  276.  
  277.      -in-dem-triangulate-data = [ yes | no ]
  278.           If set to 'yes' then the DEM data  will  be  imported  as  triangles
  279.           instead  of  4  sided  polygons.  This is sometimes useful to enable
  280.           since 4-sided DEM data polygons are not planar.
  281.  
  282. OVERVIEW OF DEM DATASET TYPES
  283.  
  284.      DEM elevation data spacing varies from 30 meters for 7.5-minute DEMs to 3
  285.      arc  seconds  for  1:250,000  scale  maps.   All  DEM data are similar in
  286.      logical data structure and are ordered from south to  north  in  profiles
  287.      that are ordered from west to east.
  288.  
  289.           7.5-minute  DEM  data  are  produced  in  7.5-minute   units   which
  290.           correspond  to  USGS  7.5-minute  topographic quadrangle map series.
  291.           7.5-minute DEM  data  consist  of  a  regular  array  of  elevations
  292.           referenced  horizontally  on the Universal Transverse Mercator (UTM)
  293.           coordinate system of the North American  Datum  of  1927  (NAD  27).
  294.           These  data  are  stored as profiles with 30-meter spacing along and
  295.           between each profile.
  296.  
  297.           15-minute  DEM  data  correspond  to  USGS   15-minute   topographic
  298.           quadrangle  map  series  in  Alaska.   The unit sizes in Alaska vary
  299.           depending on the latitudinal location of  the  unit.  15-minute  DEM
  300.           data consist of a regular array of elevation referenced horizontally
  301.           to the geographic (latitude/longitude) coordinate  system  of  North
  302.           American  Datum  1927 (NAD 27). The spacing between elevations along
  303.           profiles is 2 arc seconds of latitude by 3 arc seconds of longitude.
  304.  
  305.           30-minute  DEM  data  cover  30-minute  by  30-minute  areas   which
  306.           correspond  to  the  east  half  or west half of the USGS 30- by 60-
  307.           minute topographic quadrangle map series for the conterminous United
  308.           States  and Hawaii.  Each 30-minute unit is produced and distributed
  309.           as four 15- by 15-minute cells.  30-minute DEM data  have  the  same
  310.           characteristics as the 15-minute DEM data except that the spacing of
  311.           elevations along and between each profile is 2 arc seconds.
  312.  
  313.           1-degree DEM data are produced by the Defense Mapping Agency  in  1-
  314.           degree  by  1-degree units which correspond to the east half or west
  315.           half of USGS 1- by 2- degree topographic quadrangle maps series, for
  316.           all  the  United  States  and  its  territories.   1-degree DEM data
  317.           consist of a regular array  of  elevations  referenced  horizontally
  318.           using  the  geographic (latitude/longitude) coordinate system of the
  319.           World Geodetic System 1972 Datum.  A few units  are  also  available
  320.           using  the  World  Geodetic  System  1984  Datum.   Spacing  of  the
  321.           elevations along and between each profile  is  3  arc  seconds  with
  322.  
  323.  
  324.                                                                              5
  325.  
  326.  
  327.  
  328. Import-USGS-DEM()          Unix Programmer's Manual          Import-USGS-DEM()
  329.  
  330.  
  331.           1,201 elevations per profile.  The only exception  is  DEM  data  in
  332.           Alaska,  where  the  spacing  and  number  of elevations per profile
  333.           varies depending on the latitudinal location of the DEM.
  334.  
  335. LIMITATIONS
  336.  
  337.      This  converter  will  only  handle  DEM  datasets  which  use   UTM   or
  338.      longitude/latitude  coordinate  systems.  These are the common coordinate
  339.      systems used for most DEM data.
  340.  
  341.      If exporting to 3D Studio then all of the DEM data must  be  exported  as
  342.      one  object  so  that  proper smoothing occurs between the sub-chunks. 3D
  343.      Studio has a limit of 64k vertices and 64k polygons, therefore the  chunk
  344.      size  must  be  set  appropriately  to  limit  the number of polygons and
  345.      vertices output (the number  of  polygons  created  can  be  verified  by
  346.      setting  the '-in-dem-print-statistics' option to 'yes' and checking that
  347.      the number of polygons created is less than 65536).
  348.  
  349.      As explained above, most DEM data files have regions of invalid elevation
  350.      data  (typically  at  the  corners  and  at  the  sides). This will cause
  351.      problems if two or more datasets are imported  and  "stitched"  together:
  352.      holes will most likely appear between the data. This converter cannot fix
  353.      this problem which is an anomaly of the input data.
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.                                                                              6
  390.  
  391.